//
//  PeersController.h
//  SolarSeek
//
//  Created by Erick Fejta on 05/02/07.
//  Copyright 2005 Erick Fejta. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class SolarSeekEngine;
@class ServerConnection;
@class Peer;

@interface PeersController : NSObject {
	ServerConnection *_serverConnection;
	NSMutableSet *_peersPrivileged;
	NSMutableSet *_peers;
	NSMutableSet *_peersRemovable;
	NSMutableDictionary *_peersTracking;
}

- (id)initWithEngine:(SolarSeekEngine *)engine;

- (id)peersByName;	//key of "peers.#NAME" will return Peer for that name.
- (NSArray *)peersPrivileged;
- (NSArray *)peersAll;

- (Peer *)peerForName:(NSString *)name;

- (void)sendTrackingMessageForPeer:(Peer *)peer;
- (void)trackAvailabilityForPeer:(Peer *)peer;
- (void)stopTrackingAvailabilityForPeer:(Peer *)peer;

- (void)refreshInformationForPeer:(Peer *)peer;
- (void)refreshInformationForPeers:(id)enumeratableObject;
@end
